<div class="layui-body">
	<div class="aright">
	<div class="arz cl"><input type="file" class="uploadfile" name="filetxt" /></div>
	<form method="post" class="aform cl" >
	<table width="100%">
	      <tr>
			<th width="5%" align="center">ID编号</th>
	        <th width="12%" align="center">文件名称</th>
	        <th width="9%" align="center">基本操作</th>
	      </tr>
	      {volist name="list" id="vo"}
		  <tr>
			<td align="center">{$key+1}</td>
	        <td align="center">{$vo}</td>

	        <td align="center">
	        	<a href="{:url('man/config/deleteTxt',array('id'=>$vo))}" onclick="return confirm('您确定要删除吗？');">删除</a>
	        </td>
	      </tr>
	      {/volist}
	 </table>

	 </form>
	 		<div class="pages">
 				 
	 	 	</div>
	</div>
	</div>
</div>
<script>

layui.use(['layer', 'form','upload'], function(){  
  var layer = layui.layer,  
  upload = layui.upload,  
  form = layui.form;

  	layui.upload({
  		elem: '.uploadfile',
  		method: 'post',
  		url: '/man/config/uploadfile',
  		before: function(){
  			layer.load();
  		},
  		title: '上传校验文件txt',
  		ext:'txt',
  		type: 'file',
  		success: function(res){
  			if(res.code==122){
  				layer.msg("上传成功");
  				location.reload();
  			}else{
  				layer.msg(res.code);
  			}
  		}

  	});
});


</script>